import java.awt.Color;

import info.gridworld.actor.Flower;


public class DeadFlower extends Flower
{

	private static final double DARKENING_FACTOR = 0.05;

	@Override
	public void act()
	{

		Color c = getColor();
		int red = (int) (c.getRed() * (1 - DARKENING_FACTOR));
		int green = (int) (c.getGreen() * (1 - DARKENING_FACTOR));
		int blue = (int) (c.getBlue() * (1 - DARKENING_FACTOR));

		setColor(new Color(red, green, blue));


		if(red == 0 && green == 0 && blue == 0)
		{
			this.removeSelfFromGrid();
		}
	}


}
